package cn.ucox.web.ms.persistence;

import cn.ucox.web.ms.domain.TableColumn;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2017/9/7.
 */
//@Repository
public interface ITriggerPersistence {

    List<String> getTableList(@Param("dataBase")String dataBase, @Param("schemaname")String schemaname);

    List<TableColumn> getColumnDatas(@Param("tableName")String tableName, @Param("schemaname")String schemaname);

    List<TableColumn> getSelectedColumnDatas(@Param("tableName")String tableName,@Param("columnList")String[] columnList);

    int createInsertTrigger(@Param("tableName")String tableName,@Param("att")String att,@Param("triggerMod")String triggerMod,@Param("syncTableName")String syncTableName);

    int createUpdateTrigger(@Param("tableName")String tableName,@Param("att")String att,@Param("triggerMod")String triggerMod,@Param("syncTableName")String syncTableName);

    int createDeleteTrigger(@Param("tableName")String tableName,@Param("att")String att,@Param("triggerDel")String triggerDel,@Param("syncTableName")String syncTableName);

    int createPGModTrigger(@Param("tableName")String tableName,@Param("att")String att,@Param("level")String level);

    int createPGDeleteTrigger(@Param("tableName")String tableName,@Param("att")String att,@Param("level")String level);
}
